export default class {
  //#region 矛调管理
  getMediateList(params) {
    return this.request({
      url: "/admin/v1/contradiction/list",
      method: "GET",
      params,
    });
  }
  getMediateInfo(id) {
    return this.request({
      url: `/admin/v1/contradiction?id=${id}`,
      method: "GET",
    });
  }
  editMediate(id, data) {
    return this.request({
      url: `/admin/v1/contradiction?id=${id}`,
      method: "POST",
      data,
    });
  }

  giveMediate(data) {
    return this.request({
      url: `/admin/v1/screen_data/contradiction_assign`,
      method: "POST",
      data,
    });
  }

  //#endregion

  //#region 随手拍
  getPhotographList(id, params) {
    return this.request({
      url: `/admin/v1/feedback/list?status=${id}`,
      method: "GET",
      params,
    });
  }
  getPhotographInfo(id) {
    return this.request({
      url: `/admin/v1/feedback?id=${id}`,
      method: "GET",
    });
  }
  editPhotograph(id, data) {
    return this.request({
      url: `/api/admin/feedback/${id}/`,
      method: "PUT",
      data,
    });
  }

  solvePhotograph(id, data) {
    return this.request({
      url: `/admin/v1/feedback?id=${id}`,
      method: "POST",
      data,
    });
  }

  deletePhotoGraph(id) {
    return this.request({
      url: `/api/admin/feedback/${id}/`,
      method: "PUT",
      data,
    });
  }

  givePhotograph(data) {
    return this.request({
      url: `/admin/v1/screen_data/feedback_assign`,
      method: "POST",
      data,
    });
  }

  // 类型
  getPhotoTypeList(params) {
    return this.request({
      url: "/admin/v1/feedback/type",
      method: "GET",
      params,
    });
  }
  addPhotoType(data) {
    return this.request({
      url: `/api/admin/feedback_type/`,
      method: "POST",
      data,
    });
  }
  editPhotoType(id, data) {
    return this.request({
      url: `/api/admin/feedback_type/${id}/`,
      method: "PUT",
      data,
    });
  }
  delPhotoType(id) {
    return this.request({
      url: `/api/admin/feedback_type/${id}/`,
      method: "DELETE",
    });
  }
  //#endregion

  //#region 租房管理
  getTenancyList(params) {
    return this.request({
      url: "/api/admin/rent_house/",
      method: "GET",
      params,
    });
  }
  editTenancy(id, data) {
    return this.request({
      url: `/api/admin/rent_house/${id}/`,
      method: "PUT",
      data,
    });
  }
  delTenancy(id) {
    return this.request({
      url: `/api/admin/rent_house/${id}/`,
      method: "DELETE",
    });
  }

  getTenancyBanner() {
    return this.request({
      url: `/api/admin/rent_house_banner/`,
      method: "GET",
    });
  }

  addTenancyBanner(data) {
    return this.request({
      url: `/api/admin/rent_house_banner/`,
      method: "POST",
      data,
    });
  }

  updateTenancyBanner(data) {
    return this.request({
      url: `/admin/rent_house_banner/`,
      method: "POST",
      data,
    });
  }

  deleteTenancyBanner(id) {
    return this.request({
      url: `/api/admin/rent_house_banner/${id}/`,
      method: "DELETE",
    });
  }
  //#endregion

  //#region 施工上报
  getConsultList(params) {
    return this.request({
      url: "/api/admin/consult/",
      method: "GET",
      params,
    });
  }
  // 详情
  getConsultInfo(id) {
    return this.request({
      url: `/api/admin/consult/${id}/`,
      method: "GET",
    });
  }
  // 回复
  editConsult(id, data) {
    return this.request({
      url: `/api/admin/consult/${id}/`,
      method: "PUT",
      data,
    });
  }
  //#endregion

  //#region 爆料
  getDesclosureList(params) {
    return this.request({
      url: "/api/admin/desclosure/",
      method: "GET",
      params,
    });
  }
  // 详情
  getDesclosureInfo(id) {
    return this.request({
      url: `/api/admin/desclosure/${id}/`,
      method: "GET",
    });
  }
  // 回复
  editDesclosure(id, data) {
    return this.request({
      url: `/api/admin/desclosure/${id}/`,
      method: "PUT",
      data,
    });
  }
  //#endregion

  //#region 招工信息
  getRecruimentList(params) {
    return this.request({
      url: "/admin/v1/job_listing/list",
      method: "GET",
      params,
    });
  }

  getRecruimentDetail(id) {
    return this.request({
      url: `/admin/v1/job_listing?id=${id}`,
      method: "GET",
    });
  }

  addRecruiment(data) {
    return this.request({
      url: `/admin/v1/job_listing`,
      method: "PUT",
      data,
    });
  }
  editRecruiment(id, data) {
    return this.request({
      url: `/admin/v1/job_listing?id=${id}`,
      method: "POST",
      data,
    });
  }
  delRecruiment(id) {
    return this.request({
      url: `/admin/v1/job_listing?id=${id}`,
      method: "DELETE",
    });
  }
  //#endregion
  //#region 投票
  getVoteList(params) {
    return this.request({
      url: "/admin/v1/vote/list",
      method: "GET",
      params,
    });
  }
  addVote(data) {
    return this.request({
      url: `/admin/v1/vote`,
      method: "PUT",
      data,
    });
  }
  editVote(id, data) {
    return this.request({
      url: `/admin/v1/vote?id=${id}`,
      method: "POST",
      data,
    });
  }
  delVote(id) {
    return this.request({
      url: `/admin/v1/vote?id=${id}`,
      method: "DELETE",
    });
  }
  // 投票项
  getVoteOptionList(params) {
    return this.request({
      url: "/api/admin/vote_option/",
      method: "GET",
      params,
    });
  }
  getVoteOptionInfo(id) {
    return this.request({
      url: `/api/admin/vote_record/${id}/`,
      method: "GET",
    });
  }
  addVoteOption(data) {
    return this.request({
      url: `/api/admin/vote_option/`,
      method: "POST",
      data,
    });
  }

  editVoteOption(id, data) {
    return this.request({
      url: `/admin/v1/vote/options?vote_id=${id}`,
      method: "PUT",
      data,
    });
  }

  delVoteOption(id) {
    return this.request({
      url: `/admin/v1/vote/options?id=${id}`,
      method: "DELETE",
    });
  }

  // 投票记录
  getVoteRecordList(id) {
    return this.request({
      url: `/admin/v1/vote?id=${id}`,
      method: "GET",
    });
  }
  //#endregion
}
